<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="moduleList" />
<link
	href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" type="text/css">
<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css"
	rel="stylesheet" type="text/css">
<script type="text/javascript">
	$(document)
			.ready(
					function() {

						$(".chosen-select").chosen({});
						//货币格式化
						$('[data-accounting]')
								.each(
										function() {
											var $this = $(this);
											if ($this
													.attr("data-accounting-precision")
													&& "" != $this
															.attr("data-accounting-precision")) {
												$this
														.html(accounting
																.formatMoney(
																		$this
																				.attr("data-accounting"),
																		"¥ ",
																		$this
																				.attr("data-accounting-precision") * 1));
											} else {
												$this
														.html(accounting
																.formatMoney(
																		$this
																				.attr("data-accounting"),
																		"¥ "));
											}
										});
						$("#btnQuery").click(function() {
							$("#salesForm").submit();
						});
					});
</script>
</head>
<body>
	<form id="salesForm"
		action="${contextPath}/biz/statement/statementSales/queryByTerm?navId=${navId}"
		method="get">
		<div class="o-l-search-builder f_1">
			<div id="statement-search-builder" class="collapse"
				style="height: auto;">
				<div class="f_2">
					<div class="form-group col-sm-6">
						<label for="signBy" class="col-sm-3 control-label f_4">对账状态：</label>
						<div class="col-sm-9 f_6">
							<ossp:select dictType="RECONCILIATION_TYPE"
								name="isReconciliation" defaultSelected="0"
								id="isReconciliation" class_="f_5 "></ossp:select>
						</div>
					</div>
					<div class="form-group col-sm-6">
						<label for="inputEmail3" class="col-sm-3 control-label f_4">销售日期:</label>
						<div class="col-sm-9 f_4">
							<div class="input-group date o-a-form-datetime " data-date=""
								data-date-format="yyyy-mm-dd">
								<input class="form-control f_13" type="text" readonly
									id="saleDate" name="saleDate" /> <span
									class="input-group-addon f_time"><i
									class="glyphicon glyphicon-remove"></i></span> <span
									class="input-group-addon f_time"><span
									class="glyphicon glyphicon-calendar"></span></span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="f_8">
				<div class="f_2">
					<div class="col-sm-4 f_6">
						<input type="text" id="contractNo" name="contractNo" class="f_5"
							placeholder="供应商编号" />
					</div>
					<button type="submit" class="btn btn-warning btn_1">查&nbsp&nbsp;询</button>
				</div>
			</div>
			<div class="o-l-chevron-down">
				<a href="#" class="btn btn-default collapsed" data-toggle="collapse"
					data-target="#statement-search-builder" id="chevronDownBtn"
					role="button"><span id="glyphiconspan"
					class="glyphicon glyphicon-chevron-down"></span></a>
			</div>
		</div>

	</form>
	<div class="panel-heading">
		<h3 class="panel-title o-v-action">对账单列表</h3>
	</div>
	<tags:message content="${message}" />
	<div class="o-l-search-builder f_9">
	<table class="table table-striped table-hover o-l-table" id="table1">
		<thead>
			<tr>
				<th>销售日期</th>
				<th>供应商编号</th>
				<th>供应商名称</th>
				<th>销售额</th>
				<th>储值卡金额</th>
				<th>信用卡金额</th>
				<th>对账状态</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="statementSales">
				<tr
					data-herf="${contextPath}/biz/statement/statementSales/view?id=${statementSales.id}"
					data-target="_self">
					<td><fmt:formatDate value="${statementSales.saleDate}"
							pattern="yyyy-MM-dd" /></td>
					<td>${statementSales.supplierNo}</td>
					<td>${statementSales.supplierName}</td>
					<td data-accounting="${statementSales.sales}"></td>
					<td data-accounting="${statementSales.prepaidCardAmount}"></td>
					<td data-accounting="${statementSales.creditCardAmount}"></td>
					<td><ossp:value dictType="RECONCILIATION_TYPE"
							key="${statementSales.isReconciliation}"></ossp:value>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	</div>
	<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}" url="" total="${page.total}"/>
		<script type="text/javascript" src="${staticPath}/js/list.js"></script>
	<script type="text/javascript">
		$('.o-a-form-datetime').datetimepicker({
			language : 'zh-CN',
			weekStart : 1,
			todayBtn : 1,
			autoclose : 1,
			todayHighlight : 1,
			startView : 2,
			minView : 2,
			forceParse : 0,
			format : 'yyyy-mm-dd'
		});
	</script>
	<script type="text/javascript" src="${staticPath}/js/list.js"></script>
	<script
		src="${staticPath}/lib/datetimepicker/0.0.11/js/bootstrap-datetimepicker.min.js"
		type="text/javascript"></script>
	<script
		src="${staticPath}/lib/datetimepicker/0.0.11/js/locales/bootstrap-datetimepicker.zh-CN.js"
		type="text/javascript"></script>
	<script src="${staticPath}/lib/chosen/1.1.0/chosen.jquery.js"
		type="text/javascript"></script>
	<script src="${staticPath}/js/ossp-jquery-chosen.js"
		type="text/javascript"></script>
	<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js"
		type="text/javascript"></script>
</body>
</html>